# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=gst-editing-services
pkgver=1.16.2
pkgrel=0
pkgdesc="GStreamer Editing Services Library"
url="https://gstreamer.freedesktop.org"
arch="all !s390x !mips !mips64" # 7 Tests fail
license="LGPL-2.0-or-later"
makedepends="gstreamer-dev gtk-doc python3 gobject-introspection-dev py3-gobject3-dev
	glib-dev gst-plugins-good gst-plugins-bad-dev gst-plugins-base-dev
	libxml2-dev flex perl automake autoconf libtool"
subpackages="$pkgname-dev $pkgname-doc"
source="https://gstreamer.freedesktop.org/src/gst-editing-services/gstreamer-editing-services-$pkgver.tar.xz"
builddir="$srcdir/gstreamer-editing-services-$pkgver"

prepare() {
	default_prepare

	# https://gitlab.freedesktop.org/gstreamer/gst-editing-services/issues/70
	case "$CARCH" in
		x86_64) ;;
		*)
			sed '/ges\/layer/d' -i tests/check/Makefile.am
			;;
	esac

	autoreconf -ivf
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--mandir=/usr/share/man \
		--localstatedir=/var
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="5c0d4499f02fcc11a2f99e1629971e2df3e23717bf53896b437a5e1fdd451661e8aef61b6270ebd5a5e0173e53c947e62554764de0cd4f692e444238ca64fb66  gstreamer-editing-services-1.16.2.tar.xz"
